import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import './plugins/element.js'
import NProgress from "nprogress"
import "nprogress/nprogress.css"

Vue.config.productionTip = false
router.beforeEach((to,from,next) => {
  NProgress.start()
  next()
  store.commit('addTagRoutes',to)
  document.title = to.name
})
 
router.afterEach(() => {
  NProgress.done()
})

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
